package basic7;


public class Ex72_OOP {

	public static void main(String[] args) {

		Ex72_Retangle1 ret = new Ex72_Retangle1();
		System.out.println(ret.getArea());
		System.out.println(ret.getCircum());
		
		ret = new Ex72_Retangle1(4, 40, "red");
		
		
/*		Ex73_Fan fann = new Ex73_Fan();
		System.out.println(fann.slow);
		System.out.println(fann.speed);
		System.out.println(fann.on);
		System.out.println(fann.radius);
		System.out.println(fann.color);
		
		Ex74_Account acc = new Ex74_Account();
		System.out.println(acc.aid);
		System.out.println(acc.balance);
		System.out.println(acc.insterestRate);
		System.out.println(acc.dateCreated);
		System.out.println(acc.getmonthlyInterestRate);
		
		Ex75_Stock sto = new Ex75_Stock();
		System.out.println(sto.sname);
		System.out.println(sto.previousClosingPrice);
		System.out.println(sto.currentPrice);*/


	}//main

}//class

class Ex72_Retangle1 {

	double width;
	double height;
	String color;

public Ex72_Retangle1(){}

	public Ex72_Retangle1(double width, double height, String color ) {
//
		this.width=width;
		this.height=height;
		this.color=color;
		
//		// 위에서 생성한 변수의 초기화 시키기.
//		width = 1.0;
//		height = 1.0;
//		color = "white";
	}//사용자 정의 생성자
	
	double getArea(){
		double area=width*height;
		return area;
	}
	
	double getCircum(){
		double circum=(width+height)*2;
		return circum;
	}

}

class Ex73_Fan {

	int slow;
	int medium;
	int fast;
	int speed;
	boolean on;
	double radius;
	String color;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   {
		
		slow=1;
		medium=2;
		fast=3;
		speed=1;
		on=false;
		radius=5.0;
		color="blue";
		

	}
}

class Ex74_Account {

	int aid;
	int balance;
	double insterestRate;
	int dateCreated;
	double getmonthlyInterestRate;
	
	public Ex74_Account(){
		
		aid=0;
		balance=0;
		insterestRate=0;
		
	}

}

class Ex75_Stock {
	String sname;
	String previousClosingPrice;
	String currentPrice;


}